@extends('admin/layout/index')

@section('content')

@section('content')
    @if (count($errors) > 0)
        <div class="mws-form-message error">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span> <i class="icon-rss"></i> 公告修改</span>
    </div>
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/notice/update" method="post">
        <input type="hidden" name='id' value="{{ $data['id'] }}">
            {{ csrf_field() }}
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">标题(*必须填写)</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="title" value="{{ $data['title'] }}">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">内容(*必须填写)</label>
                    <div class="mws-form-item">
                        <textarea rows="" cols="" class="small" name="content" value="{{ $data['content'] }}">{{ $data['content'] }}</textarea>
                    </div>
                 </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">类型</label>
                    <div class="mws-form-item">
                        <select name="type">
                            <option value="公告">--请选择--</option>
                            <option value="公告" @if('公告' == $data['type']) selected @endif>公告</option>
                            <option value="特惠" @if('特惠' == $data['type']) selected @endif>特惠</option>
                        </select> 
                    </div>
                </div>
            </div>
            <div class="mws-button-row">
                <input value="提交" class="btn btn-danger" type="submit">
                <input value="重置" class="btn " type="reset">
            </div>
        </form>
    </div>      
</div>  
@endsection

@endsection